package com.hclc.yxb.model;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.hclc.entity.model.series.CustomLocalDateTimeSerializer;
import com.hclc.entity.model.series.DeCustomLocalDateTimeSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>用户账户信息表</p>
 * @author hef
 * @since 2020-10-19
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@EqualsAndHashCode(callSuper=false)
@Accessors(chain = true)
@TableName("`t_user_amount`")
public class UserAmountModel implements Serializable {

	private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value="`user_amount_id`", type= IdType.ASSIGN_ID)
	@ApiModelProperty(value = "主键")
    private String userAmountId;

    /**
     * 交易密码
     */
    @TableField(value = "`trans_pass`")
	@ApiModelProperty(value = "交易密码")
    private String transPass;

    /**
     * 用户id
     */
    @TableField(value = "`user_id`")
	@ApiModelProperty(value = "用户id")
    private String userId;

    /**
     * 金额
     */
    @TableField(value = "`balance`")
	@ApiModelProperty(value = "金额")
    private Integer balance;

    /**
     * 总消费额
     */
    @TableField(value = "`sum_consumption`")
	@ApiModelProperty(value = "总消费额")
    private Integer sumConsumption;

    /**
     * 冻结金额
     */
    @TableField(value = "`freeze`")
	@ApiModelProperty(value = "冻结金额")
    private Integer freeze;

    /**
     * 累计充值金额
     */
    @TableField(value = "`sum_recharge_balance`")
	@ApiModelProperty(value = "累计充值金额")
    private Integer sumRechargeBalance;

    /**
     * 累计订单数量
     */
    @TableField(value = "`sum_order_num`")
	@ApiModelProperty(value = "累计订单数量")
    private Integer sumOrderNum;

    /**
     * 总收入金额
     */
    @TableField(value = "`sum_income_amount`")
	@ApiModelProperty(value = "总收入金额")
    private Integer sumIncomeAmount;

    /**
     * 是否有效(1:有效,0:无效)
     */
    @TableField(value = "`enable`")
	@ApiModelProperty(value = "是否有效(1:有效,0:无效)")
    private Integer enable;

    /**
     * 排序
     */
    @TableField(value = "`sort`")
	@ApiModelProperty(value = "排序")
    private Integer sort;

    /**
     * 备注
     */
    @TableField(value = "`remark`")
	@ApiModelProperty(value = "备注")
    private String remark;

    /**
     * 状态
     */
    @TableField(value = "`status`")
	@ApiModelProperty(value = "状态")
    private Integer status;

    /**
     * 创建时间
     */
    @TableField(value = "`create_time`", fill = FieldFill.INSERT)
	@ApiModelProperty(value = "创建时间")
    @JsonDeserialize(using = DeCustomLocalDateTimeSerializer.class)
    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "`update_time`", fill = FieldFill.INSERT_UPDATE)
	@ApiModelProperty(value = "更新时间")
    @JsonDeserialize(using = DeCustomLocalDateTimeSerializer.class)
    @JsonSerialize(using = CustomLocalDateTimeSerializer.class)
    private LocalDateTime updateTime;

    /**
     * 创建时间(时间戳)
     */
    @TableField(value = "`create_time_timestamp`", fill = FieldFill.INSERT)
	@ApiModelProperty(value = "创建时间(时间戳)")
    private Long createTimeTimestamp;

    /**
     * 更新时间(时间戳)
     */
    @TableField(value = "`update_time_timestamp`", fill = FieldFill.INSERT_UPDATE)
	@ApiModelProperty(value = "更新时间(时间戳)")
    private Long updateTimeTimestamp;


}
